package com.flower.enjoyment.flower.service;

import com.flower.enjoyment.flower.entity.UserAppointment;
import com.flower.enjoyment.flower.entityDo.UserAppointmentDo;
import com.github.pagehelper.Page;

import java.util.List;

public interface UserYuYueService {

    int insert(UserAppointment record);

    /**
     * 我的预约列表
     * @param pageNo
     * @param pageSize
     * @param userId
     * @return
     */
    Page<UserAppointmentDo> selectUserYuYueListByPage(Integer pageNo, Integer pageSize, String userId);

    /**
     * 根据id获取预约详情
     * @param id
     * @return
     */
    UserAppointmentDo getUserAppointmentById(String id);

    /**
     * 更新预约信息
     * @param userAppointment
     * @return
     */
    int updateUserAppointmentById(UserAppointment userAppointment);

    /**
     * 预约管理
     * 分页
     * @param pageNo
     * @param pageSize
     * @param shopId
     * @return
     */
    Page<UserAppointmentDo> selectShopAppointmentListByPage(Integer pageNo, Integer pageSize, String shopId);

    /**
     * 预约管理
     * 不分页
     * @param shopId
     * @return
     */
    List<UserAppointmentDo> selectShopAppointmentList(String shopId);

    /**
     * 根据用户id获取用户店铺预约数量
     * @param userId
     * @return
     */
    int selectCountByShopId(String userId);
}
